<?php
class User extends AppModel {
	var $name = 'User';
	var $validate = array(
		'login' => array(
			'rule' => '/[a-z0-9\_\-]{5,20}$/i',
			'message' => 'Username must be alphanumeric and be between 5 and 20 characters long.',
		),
		'email' => VALID_EMAIL,
	);
	var $displayField = 'login';
	
	var $hasMany = array(
		'Comment' => array(
			'className' => 'Comment',
			'foreignKey' => 'user_id',
		),
	);
}
?>